package exception;

public class Demo1 {
    public static void main(String[] args) {
        //异常捕获
        int[] arr = {1, 2, 3, 4, 5};
        try {
            System.out.println(arr[5]);
        } catch (ArrayIndexOutOfBoundsException e) {
            System.out.println("下标越界!");
        }
        System.out.println("执行了吗?");
    }
}
